﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="basedataList.ascx.cs" Inherits="uswinweb.datacontrol.basedataList" %>

		<table border="0" cellpadding="0" cellspacing="0" class="edtb">
			<thead>
				<tr>
                <td>&nbsp;</td>
					<td>序号</td>
                    <td>代码</td>
                    <td>名称</td>
                    <td>英文名</td>
                    <% string[] ee = btInfo.expand.ToString().Split(','); for (int j = 0; j < ee.Length; j++)
                       {
                           if (ee[j].ToString() == "Port")
                           { %>
                    <td>启运港</td>
                    <%} if (ee[j].ToString() == "Routes")
                           { %>
                    <td>所属航线</td>
                    <%} if (ee[j].ToString() == "National")
                           { %>
                    <td>国家</td>
                    <%}
                       } %>
					<td>操  作</td>
				</tr>
			</thead>
			<tbody>
            <%foreach (System.Data.DataRow dr in basedataTab.Rows)
              { %>
				<tr>
                <td><input type="checkbox" name="ids" value="<%=dr["id"].ToString()%>"  id="ids"/></td>
					<td><%=dr["id"] %></td>
                    <td><%=dr["tcode"].ToString() == "" ? "&nbsp;" : dr["tcode"]%></td>
                    <td><%=dr["name"].ToString() == "" ? "&nbsp;" : dr["name"]%></td>
                    <td><%=dr["ename"].ToString() == "" ? "&nbsp;" : dr["ename"]%></td>
                    <% string[] eee = btInfo.expand.ToString().Split(','); for (int j = 0; j < eee.Length; j++)
                       {
                           if (eee[j].ToString() == "Port")
                           { %>
                    <td><%=dr["expand1"].ToString() == "" ? "否" : "是"%></td>
                    <%} if (eee[j].ToString() == "Routes")
                           { %>
                    <td><%=GetName(dr["expand2"].ToString().Trim(), "searoute")%></td>
                    <%} if (eee[j].ToString() == "National")
                           {%>
                    <td><%=GetName(dr["expand3"].ToString().Trim(), "country")%></td>
                    <%}
                       } %>
					<td>
						<a href="../admin/basedata_update.aspx?typeid=<%=bcode %>&bid=<%=dr["id"] %>" rel="iframe" title=" :: :: width:600,height:600" class="l_blue lightview">修改</a>
						<a title="" class="l_blue" href="#" onclick="del('<%=dr["id"] %>')">删除</a>
					</td>
				</tr>
                <%} %>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="15">
						<%=pageList%>
					</td>
				</tr>
			</tfoot>
		</table>
        <script>
            function del(val) {


                if (confirm("该操作不可恢复,您确定要删除吗?")) {

                    loading();
                    var bid = '<%=bcode %>';
                    if (val == 'all') {
                        val = checkedlist('ids');
                    }
                    if (val != "") {
                        AjaxHelper.Updater('basedataList.ascx', 'showdata', 'action=del&bid=' + bid + '&parms=' + val + '');
                        parent.reclcik();
                    }
                } else {
                }

            }
        </script>